package ccy.ccysolarcount;

import ccy.ccylibrary.plugin.CcyPlugin;
import ccy.ccysolarcount.config.CcyConfig;
import org.bukkit.Bukkit;

public class CcySolarCount extends CcyPlugin {

    public void PluginEnable() {
        Bukkit.getScheduler().runTaskTimerAsynchronously(this, () -> CcyConfig.config.updateRank(), 0L, (long)CcyConfig.config.RankTime * 20L);
    }

    public void PluginDisable() {
        super.PluginDisable();
        CcyConfig.config.save();
    }

    public Object MainClass() {
        return this;
    }

    public String pluginName() {
        return "太阳能兑换次数统计";
    }
}
